package main

import (
	"go-kit/demo6/utils"
	"go-kit/grpc/pd"
	"go-kit/grpc/services"
	"google.golang.org/grpc"
	"net"
)

func main() {

	//实例服务
	server := grpc.NewServer()

	//注册服务
	pd.RegisterGetUserInfoServer(server, new(services.UserInfoServer))

	//注册到 consul
	utils.RegService()

	lis, _ := net.Listen("tcp", ":8080")

	server.Serve(lis)

}
